/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package doc2db.interfaces.action;

import doc2db.Keey;
import doc2db.interfaces.mainWindow.MyFrame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;

/**
 *
 * @author yuriy
 */
public class CloseConectionAction implements ActionListener{
    private MyFrame mf;

    public CloseConectionAction(MyFrame f) {
        mf = f;
    }

    public void actionPerformed(ActionEvent e) {
        if(Keey.isConnected){
            Keey.isConnected = false;
            mf.menu.setEnableButton(false);
            mf.toolBar.setEnableButton(false);
            JOptionPane.showMessageDialog(null, "Соеденение разорванно",
                    "message", JOptionPane.DEFAULT_OPTION);
        }
    }

}
